package org.x.user.vo;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DeptTreeVO {
    private Long id;
    private String name;
    private Long parentId;
    private Integer sort;
    private List<DeptTreeVO> children = new ArrayList<>();

    public void addChild(DeptTreeVO child) {
        if (child != null) {
            this.children.add(child);
        }
    }
}
